<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:wh="http://java.sun.com/jsf/composite/wh"
	xmlns:p="http://primefaces.org/ui">

<h:body>
	<ui:composition template="template/template.xhtml">
		<ui:define name="content">
			<h:form id="chartForm">
				<h:panelGrid columns="1">
					<p:breadCrumb>
					<p:menuitem value="Categories" url="adminGameStatisticsManagement.xhtml#" />
					<p:menuitem value="#{adminMBean.selectedGame.name}"
						url="adminGameStatisticsManagement.xhtml#" />
					</p:breadCrumb>
					
					<h1>Game Statistic Chart</h1>
					
					<p:selectOneMenu value="#{adminMBean.selectedChartOption}">
						<f:selectItem itemLabel="Select One" itemValue="" />
						<f:selectItems value="#{adminMBean.chartOptions}"/>
					</p:selectOneMenu>
					<p:commandButton id="cmdGenerate" value="Generate" update=":chartForm" actionListener="#{adminMBean.eventLoadChartData}"></p:commandButton>

<!--  
					<p:chart type="bar" model="#{adminMBean.marketGameBudgetChart}" style="height:300px"/>
					<p:chart type="bar" model="#{adminMBean.marketGameImageChart}" style="height:300px"/>
					<p:chart type="line" model="#{adminMBean.marketGameRoundDecisionRevenue}" style="height:300px"/>
					<p:chart type="bar" model="#{adminMBean.marketGameTopSellerChart}" style="height:300px"/>
-->					
				</h:panelGrid>
				
				<p:panel id="panelChart" rendered="#{not empty adminMBean.chartData}">
					<p:chart id="chart" type="#{adminMBean.chartType}" model="#{adminMBean.chartData}" style="height:300px"/>
				</p:panel>
						
				
				
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>